.class Lrexsee/core/transportation/RexseeDownload$4;
.super Lrexsee/core/transportation/RexseeDownload$DownloadProgressListener;
.source "RexseeDownload.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/transportation/RexseeDownload;->download(Ljava/lang/String;Z)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/transportation/RexseeDownload;

.field private final synthetic val$cancelable:Z


# direct methods
.method constructor <init>(Lrexsee/core/transportation/RexseeDownload;Z)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iput-boolean p2, p0, Lrexsee/core/transportation/RexseeDownload$4;->val$cancelable:Z

    .line 313
    invoke-direct {p0}, Lrexsee/core/transportation/RexseeDownload$DownloadProgressListener;-><init>()V

    return-void
.end method


# virtual methods
.method public run(Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;Ljava/lang/Runnable;)V
    .locals 7
    .param p1, "url"    # Ljava/lang/String;
    .param p2, "path"    # Ljava/lang/String;
    .param p3, "status"    # I
    .param p4, "totalSize"    # I
    .param p5, "downloadedSize"    # I
    .param p6, "message"    # Ljava/lang/String;
    .param p7, "stopTheDownload"    # Ljava/lang/Runnable;

    .prologue
    const-string v6, "......"

    const-string v5, " "

    .line 316
    const/4 v2, -0x1

    if-ne p3, v2, :cond_2

    .line 317
    iget-boolean v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->val$cancelable:Z

    if-eqz v2, :cond_1

    .line 318
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->PROGRESS_CONNECT:Ljava/lang/String;

    invoke-virtual {v2, v3, p7}, Lrexsee/core/progress/RexseeProgressDialog;->showWithRunnable(Ljava/lang/String;Ljava/lang/Runnable;)V

    .line 337
    :cond_0
    :goto_0
    return-void

    .line 320
    :cond_1
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->PROGRESS_CONNECT:Ljava/lang/String;

    invoke-virtual {v2, v3}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    goto :goto_0

    .line 322
    :cond_2
    const/4 v2, -0x2

    if-ne p3, v2, :cond_3

    .line 323
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v2}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    goto :goto_0

    .line 324
    :cond_3
    const/4 v2, -0x3

    if-ne p3, v2, :cond_4

    .line 325
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v2}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    goto :goto_0

    .line 326
    :cond_4
    if-nez p3, :cond_7

    .line 327
    if-gez p4, :cond_5

    const-string v2, ""

    move-object v1, v2

    .line 328
    .local v1, "progress":Ljava/lang/String;
    :goto_1
    const-string v2, "/"

    invoke-virtual {p2, v2}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v2

    add-int/lit8 v2, v2, 0x1

    invoke-virtual {p2, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 329
    .local v0, "fileName":Ljava/lang/String;
    iget-boolean v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->val$cancelable:Z

    if-eqz v2, :cond_6

    .line 330
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    new-instance v3, Ljava/lang/StringBuilder;

    sget-object v4, Lrexsee/core/lang/RexseeLanguage;->PROGRESS_DOWNLOAD:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "......"

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " "

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3, p7}, Lrexsee/core/progress/RexseeProgressDialog;->showWithRunnable(Ljava/lang/String;Ljava/lang/Runnable;)V

    goto :goto_0

    .line 327
    .end local v0    # "fileName":Ljava/lang/String;
    .end local v1    # "progress":Ljava/lang/String;
    :cond_5
    new-instance v2, Ljava/lang/StringBuilder;

    mul-int/lit8 v3, p5, 0x64

    div-int/2addr v3, p4

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "%"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    move-object v1, v2

    goto :goto_1

    .line 332
    .restart local v0    # "fileName":Ljava/lang/String;
    .restart local v1    # "progress":Ljava/lang/String;
    :cond_6
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    new-instance v3, Ljava/lang/StringBuilder;

    sget-object v4, Lrexsee/core/lang/RexseeLanguage;->PROGRESS_DOWNLOAD:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "......"

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " "

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 334
    .end local v0    # "fileName":Ljava/lang/String;
    .end local v1    # "progress":Ljava/lang/String;
    :cond_7
    const/4 v2, 0x1

    if-ne p3, v2, :cond_0

    .line 335
    iget-object v2, p0, Lrexsee/core/transportation/RexseeDownload$4;->this$0:Lrexsee/core/transportation/RexseeDownload;

    iget-object v2, v2, Lrexsee/core/transportation/RexseeDownload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v2}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    goto/16 :goto_0
.end method
